import 'package:flutter/material.dart';

class FlexDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
      title: 'Flutter 盒子模型',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: Text('Flex'),
        ),
        body: Center(child: Container(width: 300,height: 300,
        color: Colors.blue,
        child: Container(
          color: Colors.red,
          margin: EdgeInsets.fromLTRB(10, 0, 20, 30),
          child: Container(
            margin: EdgeInsets.fromLTRB(10, 10, 10, 10),
            color: Colors.white60,
            child: Text('这是一长段文字'*4),
            padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
          ),
        ),
        ),),
        ),
    );
  }
}